import 'package:grocery_app_demo/api/entity/warehouse_list_res_entity.dart';
import 'package:grocery_app_demo/generated/json/base/json_convert_content.dart';

WarehouseListResEntity $WarehouseListResEntityFromJson(
    Map<String, dynamic> json) {
  final WarehouseListResEntity warehouseListResEntity =
      WarehouseListResEntity();
  final int? provinceId = jsonConvert.convert<int>(json['provinceId']);
  if (provinceId != null) {
    warehouseListResEntity.provinceId = provinceId;
  }
  final int? cityId = jsonConvert.convert<int>(json['cityId']);
  if (cityId != null) {
    warehouseListResEntity.cityId = cityId;
  }
  final int? areaId = jsonConvert.convert<int>(json['areaId']);
  if (areaId != null) {
    warehouseListResEntity.areaId = areaId;
  }
  final int? villageId = jsonConvert.convert<int>(json['villageId']);
  if (villageId != null) {
    warehouseListResEntity.villageId = villageId;
  }
  final String? addr = jsonConvert.convert<String>(json['addr']);
  if (addr != null) {
    warehouseListResEntity.addr = addr;
  }
  final String? whCode = jsonConvert.convert<String>(json['whCode']);
  if (whCode != null) {
    warehouseListResEntity.whCode = whCode;
  }
  final String? whName = jsonConvert.convert<String>(json['whName']);
  if (whName != null) {
    warehouseListResEntity.whName = whName;
  }
  final String? contact = jsonConvert.convert<String>(json['contact']);
  if (contact != null) {
    warehouseListResEntity.contact = contact;
  }
  final String? mobile = jsonConvert.convert<String>(json['mobile']);
  if (mobile != null) {
    warehouseListResEntity.mobile = mobile;
  }
  final int? id = jsonConvert.convert<int>(json['id']);
  if (id != null) {
    warehouseListResEntity.id = id;
  }
  return warehouseListResEntity;
}

Map<String, dynamic> $WarehouseListResEntityToJson(
    WarehouseListResEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['provinceId'] = entity.provinceId;
  data['cityId'] = entity.cityId;
  data['areaId'] = entity.areaId;
  data['villageId'] = entity.villageId;
  data['addr'] = entity.addr;
  data['whCode'] = entity.whCode;
  data['whName'] = entity.whName;
  data['contact'] = entity.contact;
  data['mobile'] = entity.mobile;
  data['id'] = entity.id;
  return data;
}